package com.apiserver.kernel.utils;

/**
 *
 * 描述：维护订单操作状态
 * @author： feizhou
 * @date ：2019/1/30 17:05
 * @param ：
 * @return
 */
public enum OrderLogState {
    state1("1","待付款"),
    state2("2","可使用"),
    state3("3","已完成"),
    state4("4","退款/售后");
    private String key;
    private String value;
    OrderLogState(String key,String value){
        this.key=key;
        this.value=value;
    }
    public static String getName(String key) {
        OrderLogState[] arr = OrderLogState.values();

        for (OrderLogState orderLogState : arr) {
            if (orderLogState.getKey().equals(key)) {
                return orderLogState.getValue();
            } else {
                continue;
            }
        }
        return  null;
    }
    public String getValue() {
        return value;
    }
    public String getKey() {
        return key;
    }
}